-
Notifications
You must be signed in to change notification settings - Fork 22
Axis labels should respect the theme (#142) and fix #96 whilst I'm at it. #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Axis labels should respect the theme (#142) and fix #96 whilst I'm at it. #149
Conversation
a7bdda2
to
03778c7
Compare
359a9fe
to
2413b53
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The axis labels were black when running napari from main
, but running from this branch meant that they were white in dark mode and black in light mode so yay!
Co-authored-by: David Stansby <[email protected]>
2413b53
to
4af1c3f
Compare
Not a nice global fix, but by setting the test fixture viewer's theme to light, napari-matplotlib will give axes dark grey axes, labels, and ticks.
4af1c3f
to
21b5823
Compare
I was replacing the plots in Do I need to get into the habit of running |
Ah yes, that was a recent change by David. I've been running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #142 by reapplying the colour scheme before
canvas.draw
inNapariMPLWidget._draw
(cheers @dstansby!).Since fixing the colour for axis labels means I need to regenerate the reference scatter plots, I thought I might as well fix #96 by setting the
viewer.theme
for every test that is marked@pytest.mark.mpl_image_compare
. It's not a fix via a nice global stylesheet setting but... you can now read the axes on the baseline figures. (Which is maybe nice??)Testing:
test_theme
.Notes for reviewers:
Please double-check for me that a)
main
really does have #142, and that b) this really does solve it. I have had some strangeness that I am currently blaming onpip install
without-e
.